import { instance } from '@/utils/request';

const submitOrder = async (data: any) => {
  return instance.post('/Orders/Add', data);
};

const getPagination = async (page: number, limit: number, key?: string, statuss?: number[]) => {
  return instance.get('/Orders/BusinessPagination', { page, limit, key, statuss });
};

const acceptOrder = async (data: { id: number; odids: number[]; counts: number[] }) => {
  return instance.post('/Orders/AcceptOrder', data);
};

export default { submitOrder, getPagination, acceptOrder };
